package day6;

import java.util.Scanner;

public class Demo6Car {
    //品牌
    public String mark;
    //功能
    public int speed = 20;
    public void drive(){
        System.out.println(speed+"km/h");
    }
}

class SubCar extends Demo6Car{
    //价格
    public double price;
    //速度
    public int speed;
    //变速
    public void drives(){
        System.out.println("输入新速度:");
        Scanner sc = new Scanner(System.in);
        int su = sc.nextInt();
        super.speed = su;
        super.drive();

    }


}